home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Writing to a SUSink
- Sent: 9/18/96 10:31 PM
- Received: 9/18/96 10:31 PM
- From: jim@melongem.com (Jim Lloyd)
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List
-
-
- At 1:04 PM 9/18/96, Jerome Jahnke wrote:
- >I decided at a later date to make a part I had been working into an
- >embeddable part. So what I did is steal all the code from a new embeddable
- >part made with PartMaker but I can't open it.
- >
- >When I create the stationary I have this in my CBaseContent class.
- >
- > unsigned long count = fProxyList->Count();
- > archive << count;
- >
- >But when I try to open the stationry my Internalize function which looks
- >like this.
- >
- > unsigned long count;
- > archive >> count;
- >
- >says that count is 0x0000FFFF instead of 0x00000000 which is what I put
- >there. So why are the last four bytes F's instead of 0's and should I
- >convert those to FW_Fixed's which seem to write OK. I haven't tried that,
- >but this is the next step. I am curious if The sink is only reading or
- >writing the first four bytes. Or if I am doing something really really
- >wrong.
-
- Jer,
-
- The code you show should work correctly. I suspect that somewhere else
- you've got unbalanced reads and writes, so you're actually reading the
- wrong set of four bytes. Trace through both the write path and the read
- path and make sure everything is properly balanced.
-
- Jim Lloyd
- (formerly on the ODF team)